package com.ls.fw.hadoop.client.bean;

import java.io.Serializable;


/**
 * hadoop 中文件信息类
 * <p></p>
 * @author ls 2013-8-30 下午04:47:35
 * @version V1.0   
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify by user: {修改人} 2013-8-30
 * @modify by reason:{方法名}:{原因}
 */
public class HadoopFileStatus implements Serializable{
	
	 /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name = "";//文件名称
	 private String path = "";//文件路径
	 private boolean isDir = false;//是否为目录
	 private long len = 0;
     private long replication = 0;
	 private long blockSize = 0;
     private String modificationTime;
	 private String permission;
	 private String owner;
	 private String group;
	 
	 
	public HadoopFileStatus(String hdfsurl,String name, String path, boolean isDir, long len,
			long replication, long blockSize, String modificationTime,
			String permission, String owner, String group) {
		super();
		this.name = name;
		this.path = path.replace(hdfsurl, "");
		this.isDir = isDir;
		this.len = len;
		this.replication = replication;
		this.blockSize = blockSize;
		this.modificationTime = modificationTime;
		this.permission = permission;
		this.owner = owner;
		this.group = group;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public boolean isDir() {
		return isDir;
	}
	public void setDir(boolean isDir) {
		this.isDir = isDir;
	}
	public long getLen() {
		return len;
	}
	public void setLen(long len) {
		this.len = len;
	}
	public long getReplication() {
		return replication;
	}
	public void setReplication(long replication) {
		this.replication = replication;
	}
	public long getBlockSize() {
		return blockSize;
	}
	public void setBlockSize(long blockSize) {
		this.blockSize = blockSize;
	}
	public String getModificationTime() {
		return modificationTime;
	}
	public void setModificationTime(String modificationTime) {
		this.modificationTime = modificationTime;
	}
	public String getPermission() {
		return permission;
	}
	public void setPermission(String permission) {
		this.permission = permission;
	}
	public String getOwner() {
		return owner;
	}
	public void setOwner(String owner) {
		this.owner = owner;
	}
	public String getGroup() {
		return group;
	}
	public void setGroup(String group) {
		this.group = group;
	}
	@Override
	public String toString() {
		return "HadoopFileStatus [blockSize=" + blockSize + ", group=" + group
				+ ", isDir=" + isDir + ", len=" + len + ", modificationTime="
				+ modificationTime + ", name=" + name + ", owner=" + owner
				+ ", path=" + path + ", permission=" + permission
				+ ", replication=" + replication + "]";
	}
	 
	 
}
